package jike.demo10.code2;

/**
 * @param
 * @author oyz
 * @version 1.0.4
 * @description:TODO
 * @date 2022/11/2 21:59
 */
public class Ostrich implements EggLayable,Tweetable{

    // 组合
    private EggLayAbility ability = new EggLayAbility();

    //组合
    private TweetAbility tweetAbility = new TweetAbility();

    @Override
    public void tweet() {
        // 委托
        tweetAbility.tweet();
    }

    @Override
    public void layEgg() {
        // 委托
        ability.layEgg();

    }
}
